<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/favicon.ico"/>
<title><?php if(isset($seotitle)): echo ($seotitle); else: ?>后台首页<?php endif; ?> - 网站管理系统</title>
<link type="text/css" rel="stylesheet" href="/Public/admin/style/default.css" />
<script type="text/javascript" src="/Public/admin/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="/Public/admin/plugin/artDialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="/Public/admin/plugin/artDialog/plugins/iframeTools.source.js"></script>
<script type="text/javascript" src="/Public/admin/plugin/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/Public/admin/js/reset.js"></script>
<script type="text/javascript" src="/Public/admin/js/master.js"></script>
<script type="text/javascript" src="/Public/admin/plugin/layer/layer.js"></script>

<script type="text/javascript">
//顶部菜单
$(function(){
	$(".nav ul li").click(function(){
		$(this).addClass("cur").siblings("li").removeClass("cur");
	})
})
//左侧菜单加载
function navLoad(i){
	$(".masterMenu").addClass("masterMenuLoading");
	$.get("<?php echo U('ajaxmenu');?>",{id: i, rnd: Math.random()}, function(data){
		$(".masterMenu>ul").html(data);
        
        //清理子菜单为空的链接
        $(".masterMenu>ul>li").each(function(){
            if($(this).find("ul li").size()==0){
                $(this).remove();
            }
        });

		$(".masterMenu").removeClass("masterMenuLoading");
	})
}
</script>
</head>

<body style="overflow:auto;">
<!--头部-->
<div class="header clearfix">
	<h1 class="logo"><span class="logotit" style='font-size:28px;'>后台管理系统</span></h1>
    <div class="fr">
    	<!--用户信息-->
    	<div class="hdUserWrap">
        	<div class="hdUserInfo">
            	<img src="/Public/admin/images/avatar.png" width="23" height="23" />
                <span><?php echo ($admin['nickname']); ?></span>
            </div>
            <div class="hdUserMain">
            	<div class="avatar"> <a href=""><img src="/Public/admin/images/avatarbig.png" alt="" width="95" height="95" /></a> </div>
                <div class="userdata">
                	<h4><?php echo ($admin['nickname']); ?></h4>
                    <span class="email"><?php echo ($admin['username']); ?></span>
                    <ul>
                        <li><a href="/" target="_blank">前往首页</a></li-->
                        <li><a href="<?php echo U('logout');?>">退出</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <!--用户信息-->
        
        <!--工具-->
        <div class="hdTools">
        	<a href="/" target="_blank" title="访问前台" class="hdTools1">访问前台</a>
            <a href="javascript:location.reload();" title="刷新" class="hdTools2">刷新</a>
            <a href="<?php echo U('logout');?>" class="hdTools3" title="退出">退出</a>
        </div>
        <!--工具-->
    </div>
</div>
<!--头部-->

<!--主导航-->
<div class="navWrap clearfix">
	<div class="nav">
    	<ul>
        	<?php if(is_array($navList)): $i = 0; $__LIST__ = $navList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><li <?php if($i == 1): ?>class="cur"<?php endif; ?>><a href="<?php if(isset($v['submenu'])): ?>javascript:navLoad(<?php echo ($key); ?>);<?php else: echo ($v['url']); endif; ?>"><?php echo ($v['title']); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
    </div>
</div>
<!--主导航-->

<!--主体-->
<div class="masterWrap">
	<!--左侧菜单-->
    <div class="masterMenu masterMenuLoading">
    	<ul>
            <li><a href="javascript:;" class="ico ico-global">全局设置</a><span class="arrow"></span>
                <ul>
                    <li><a href="http://www.sina.com" target="main_iframe">新浪首页</a></li>
                    <li><a href="#">表单验证</a></li>
                    <li><a href="#">编辑器</a></li>
                </ul>
            </li>
            <li><a href="javascript:;" class="ico ico-onlinetips">在线通知管理</a><span class="arrow"></span>
                <ul>
                    <li><a href="http://www.sina.com" target="main_iframe">新浪首页</a></li>
                    <li><a href="#">表单验证</a></li>
                    <li><a href="#">编辑器</a></li>
                </ul>
            </li>
            <li><a href="javascript:;" class="ico ico-cache">缓存管理</a><span class="arrow"></span>
                <ul>
                    <li><a href="http://www.sina.com" target="main_iframe">新浪首页</a></li>
                    <li><a href="#">表单验证</a></li>
                    <li><a href="#">编辑器</a></li>
                </ul>
            </li>
            <li><a href="http://www.qq.com" target="main_iframe" class="elements">腾讯官网</a></li>
            <li><a href="<?php echo U('main');?>" target="main_iframe">欢迎页</a></li>
            <li><a href="<?php echo U('lists');?>" target="main_iframe">列表页</a></li>
            <li><a href="<?php echo U('edit');?>" target="main_iframe">编辑页</a></li>
            <li><a href="javascript:;" class="error">提示页面</a>
                <span class="arrow"></span>
                <ul id="error">
                    <li><a href="<<?php echo U('succ');?>>" target="main_iframe">成功页面</a></li>
                    <li><a href="<<?php echo U('err');?>>" target="main_iframe">错误页面</a></li>
                </ul>
            </li>
        </ul>
        <a class="togglemenu" title="关闭"></a>
    </div>
    <script>navLoad(0);//初始化</script>
    <!--左侧菜单-->
    
    <!--展开按钮-->
    <a href="javascript:;" class="toggleOpen" title="展开"><i></i></a>
    <!--展开按钮-->
    
    <!--右侧主体-->
    <div class="masterMain">
    	<iframe width="100%" height="100%" scrolling="auto" id="main_iframe" name="main_iframe" frameborder="0" src="<?php echo U('main');?>"></iframe>
    </div>
    <!--右侧主体-->
</div>
<!--主体-->

</body>
</html>